package com.hzncc.flowable_diboot.contract.vo;

import com.diboot.core.binding.annotation.BindField;
import com.diboot.iam.entity.IamOrg;
import com.diboot.iam.entity.IamUser;
import com.hzncc.flowable_diboot.contract.entity.ContractAudit;
import com.hzncc.flowable_diboot.contract.entity.ContractTeam;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
/**
* 合同团队 VO定义
* @author MyName
* @version 1.0
* @date 2024-08-22
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class ContractTeamListVO extends ContractTeam  {
private static final long serialVersionUID = 1919795540526937278L;
    /**
    * 成员主键 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "userNum",
        condition = "this.member_id = id"
     )
    private String memberIdLabel;

    /**
    * 成员姓名 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.memberId = id"
     )
    private String name;

    /**
    * 所属部门 关联信息
    */

    @BindField(
        entity = IamOrg.class,
        field = "name",
       condition = "this.memberId = dbt_iam_user.id and dbt_iam_user.org_id = id"
     )
    private String dept;

    /**
    * 合同主键 关联信息
    */

    @BindField(
        entity = ContractAudit.class,
        field = "contractCode",
        condition = "this.contract_id = id"
     )
    private String contractIdLabel;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

}